//
// Created by lfm on 25-4-18.
//
#include <iostream>
#include <string>
using namespace std;


void test01()
{
    string str1 = "我";
    str1 += "114514";
    cout << str1 << endl;

    str1 += 'a';
    cout << str1 << endl;

    string str2 = "LOL DNF";
    str1 += str2;

    cout << "str1 = " << str1 << endl;


    string str3 = "I";
    str3.append("love");

    cout << "str3 = " << str3 << endl;

    str3.append("game abcde", 4);

    cout << "str3 = " << str3 << endl;

    // str3.append(str2);

    // cout << "str3 = " << str3 << endl;
    //参数2从哪个位置开始获取， 参数3获取个数
    str3.append(str2, 4, 3);
    cout << "str3 = " << str3 << endl;

}
int main()
{
    test01();

    return 0;
}